package com.example.tdck.service;

import com.example.tdck.dao.EventDao;
import com.example.tdck.pojo.Effect;
import com.example.tdck.pojo.Event;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;




@Service
public class EventService {

    @Autowired
    private EventDao eventDao;

    public Event getRandomEvent(){
        return eventDao.getRandomByMajor(0);
    }

    public Event getRandomEvent(int major){
        return eventDao.getRandomByMajor(major);
    }


}
